<?
include("../com.inc.php");
if(!$_SESSION['memberID']){exit("<script>window.location='dlogin.html'</script>");}
$account =$_REQUEST["url"];  //账号id
$oname =$_REQUEST["dcode"] ; //公司名称

if(isset($_REQUEST["dcode"])){
	$ac=$GLOBALS['_ac'];
	$pw=$GLOBALS['_pw'];
	$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
	$xml= $s->Create_Conn_REC($account,$oname);
	if(strlen($xml) == 32)
	{
		echo "<script>alert('关联成功!');window.location.href='http://www.12301.cc/Synchronous.html'</script>";
		exit;
		}
    else
	{
		echo "<script>alert('账号生成出错!');</script>";
	}

}